from unittest import TestCase
from time import sleep

from TEST.FuncLogic.Page_web_登录 import Login
from TEST.FuncLogic.Page_web_余额充值 import Charge
from TEST.Head.Page import Page


class TestLoan(TestCase):

    def test_Sucess(self):
        username = 'Mineways'
        password = 'tang991108'
        # driver信息
        driver = Page().driver
        # 登陆
        Login(driver).login(username, password)
        Charge(driver).charge()
        Charge(driver).payword()
        sleep(0.5)
        # 获取结果信息
        result = driver.title
        # 判断
        print(result)
        # 关闭页面
        driver.quit()